package com.autumn.zero.workflow.web.configure;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.autumn.zero.workflow.web.controllers.WorkflowDefinitionController;
import com.autumn.zero.workflow.web.controllers.WorkflowUserTaskController;

@Configuration
public class AutumnDefaultZeroWebWorkflowConfiguration {

	/**
	 * 
	 * @return
	 */
	@Bean
	@ConditionalOnMissingBean(WorkflowDefinitionController.class)
	public WorkflowDefinitionController autumnZeroWorkflowDefinitionController() {
		return new WorkflowDefinitionController();
	}

	/**
	 * 
	 * @return
	 */
	@Bean
	@ConditionalOnMissingBean(WorkflowUserTaskController.class)
	public WorkflowUserTaskController autumnZeroWorkflowUserTaskController() {
		return new WorkflowUserTaskController();
	}
}
